package sicnu.cs.ich.activity.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.apache.rocketmq.client.exception.MQBrokerException;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.remoting.exception.RemotingException;
import sicnu.cs.ich.api.domain.dto.CallDTO;
import sicnu.cs.ich.api.domain.entity.Activities;

import java.util.List;

/**
 * @author 黎琦
 * @date 2021/12/23 15:40
 **/
public interface IActivityRankService {
    /**
     * 指定活动热度+1，即点击量+1
     *
     * @param id 活动id
     */
    void activityHitIncrement(Integer id) throws InterruptedException, RemotingException, MQClientException, MQBrokerException, JsonProcessingException;

    /**
     * 指定号召热度+1，即点击量+1
     *
     * @param id 号召id
     */
    void callHitIncrement(Integer id) throws InterruptedException, RemotingException, MQClientException, MQBrokerException;

    /**
     * 获取活动排行榜(这使用CallDTO是他的字段合适，实际上还是activity)
     */
    List<Activities> getActivityRanking();
}
